package com.lagou.config;

import org.springframework.core.annotation.AnnotationAwareOrderComparator;
import org.springframework.util.ReflectionUtils;
import org.springframework.web.WebApplicationInitializer;

import javax.servlet.ServletContainerInitializer;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import java.lang.reflect.Modifier;
import java.util.*;

/**
 * description MySpringServletContainerInitializer
 * author wy
 * date 2021-06-02 23:03
 **/
public class MySpringServletContainerInitializer implements ServletContainerInitializer
{
    /**
     * Servlet 3.0+容器启动时将自动扫描类路径以查找实现Spring的Webapplicationinitializer接口的所有实现，
     * 将其放进一个Set集合中，提供给ServletContainerInitializer中onStartup方法的第一个参数。
     * @param set
     * @param servletContext
     * @throws ServletException
     */
    public void onStartup(Set<Class<?>> set, ServletContext servletContext) throws ServletException
    {
        new MyWebApplicationInitializer().onStartup(servletContext);
    }
}
